function shopping(){
    $.ajax({
        type: "get",
        url: "http://www.xiongmaoyouxuan.com/api/sub_column/174/items",
        data: {
            start: 0
        },
        success: function (data) {
            let shoppingList = data.data.list
            let text=''
            shoppingList.forEach(item => {
                text = text+`<li>
                <div><img src="${item.image}"></div>
                <div>${item.title}</div>
                <div>
                    <span class="sp1">淘宝</span>
                    <span class="sp2">包邮</span>
                </div>
                <div>
                    <div class="price">
                        <span>￥<span>${item.price}</span></span>
                        <span>3.9万人已买</span>
                    </div>
                    
                    <span class="quan">${item.couponValue}</span>
                </div>
            </li>`
            });
            text = text + `
            <li style="background-color:#f6f6f6">
                
            </li>`
            
             $('.shopping-list ul').html(text)   
        }
    });
}
shopping()

// menu菜单 
$('.menu').mouseover(function(){
    $('.myList').css('display','block');
})
$('.menu').mouseout(function(){
    $('.myList').css('display','none');
})
$('.myList').mouseover(function(){
    $('.myList').css('display','block');
})
$('.myList').mouseout(function(){
    $('.myList').css('display','none');
})
$('.myList div').mouseover(function(){
    $('.myList div').removeClass('color');
    $(this).addClass('color');
})
$('.myList div').mouseout(function(){
    $('.myList div').removeClass('color');
})
$('.myList').first().click(function(){
    location.href='../pages/login.html'
})
/* 页面跳转 */
$('nav p').click(function(){
    location.href='../pages/index.html'
})
$('.li1').click(function(){
    location.href='../pages/index2.html'
})
$('.li2').click(function(){
    location.href='../pages/index3.html'
})
$('.li3').click(function(){
    location.href='../pages/index4.html'
})